<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\Admins
 *
 * @property int $id
 * @property string|null $username
 * @property string|null $password
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property \Illuminate\Support\Carbon|null $created_at
 * @method static \Illuminate\Database\Eloquent\Builder|Admins newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|Admins newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|Admins query()
 * @method static \Illuminate\Database\Eloquent\Builder|Admins whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Admins whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Admins wherePassword($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Admins whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Admins whereUsername($value)
 * @mixin \Eloquent
 */
class Admins extends Model
{
    use HasFactory;
    protected $dateFormat='U';
    protected $fillable=['username','password','role_id'];
    protected $hidden=['password'];
    public function role()
    {
        return $this->hasOne(Role::class,'id','role_id');
    }
}
